//package com.neu.his.dms.service.impl;
//
//import org.elasticsearch.client.RestHighLevelClient;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.elasticsearch.client.ClientConfiguration;
//import org.springframework.data.elasticsearch.client.RestClients;
//
//@Configuration
//public class EsConf {
//    @Value("${elasticSearch.rest.uris:http://49.235.94.235:9200}")
//    private String edUrl;
//
//    //localhost:9200 写在配置文件中就可以了
//    @Bean
//    RestHighLevelClient client() {
//        ClientConfiguration clientConfiguration = ClientConfiguration.builder()
//                .connectedTo(edUrl)//elasticsearch地址
//                .build();
//
//        return RestClients.create(clientConfiguration).rest();
//    }
//}
